{% extends base_template %} {% load i18n xadmin_tags %} {% load crispy_forms_tags %} {% block title %}{{ title }} | {{ site_title }}{% endblock %} {% block extrastyle %}{{ block.super }}
<style type="text/css">
    body {
        padding-top: 0px;
        background: #555299 url('{%static 'images/bg_logo.png' %}') no-repeat center center fixed;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        background-size: cover;
        -o-background-size: cover;
        height: 100%;
        width: 100%;
        margin:0px;
    }

    .wapper {
        width: 350px;
        height: 65%;
        padding: 15px;
        overflow: hidden;
        margin: auto;
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
    }

    .logo {
        display: block;
        vertical-align: middle;
        width: 96px;
        /* height: 96px; */
        text-align: center;
        align-content: center;
        align-items: center;
        border-radius: 128px;
        margin-left: auto;
        margin-right: auto;
    }

    h1.title {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        color: #ffffff;
        font-size: 16px;
        font-weight: 900;
    }

    h2 {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
        font-size: 16px;
        margin-top: 5px;
        color: #dedada;
        font-weight: 800;
    }
    .quick-links {
        margin-top: 50px;
    }

    .quick-links li {
        width: 23%;
    }

    .controls {
        padding: 5px 15px !important;
        background: none;
    }

    .btn-circle {
        font-color: rgba(255, 255, 255, 0.56);
        color: rgba(255, 255, 255, 0.56);
        border: none;
    }

    .btn-circle:hover {
        text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
        font-color: #fff;
        color: #fff;
        border-color: #fff;
    }

    .panel-single {
        background-color: rgba(255, 255, 255, 0.08);
        border: medium none;
        -moz-box-shadow: 6px 6px 12px #000;
        -webkit-box-shadow: 6px 6px 12px #000;
        box-shadow: 6px 6px 12px #000;
        padding-top: 1px;
        margin-top: 20px;
    }

    .panel-single .panel-heading {
        text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    }

    .panel-footer{
        background-color: rgba(255, 255, 255, 0.02);
        border-top: 1px solid #dddddd1f;
    }

    .panel-footer > .text-info > a{
        color: #98cdec;
    }

    .footer {
        position: absolute;
        width: 100%;
        color: rgba(255, 255, 255, 0.6);
        padding: 30px;
        bottom: 0px;
    }
</style>
{% endblock %} {% block bodyclass %}login{% endblock %} {% block body %}

<div class="container">
    <div class="wapper"> 
            <div class="logo"><img alt="" src="{% static 'images/logo.png' %}" /> </div>
            <form action="" method="post" id="login-form">
                <div class="panel panel-primary panel-single" id="panel-login">
                    {% csrf_token %} {% block login_form %}
                    <div>
                        <div style="text-align: center;">
                            <!-- <div class="logo"><img alt="" src="{% static 'images/logo.png' %}"  /> </div> -->
                            <!-- <i class="fa fa-pagelines" aria-hidden="true" style="font-size: 64px;color: greenyellow;"></i> -->
                            <h1 class="title">{{admin_view.site_title}}</h1>
                        </div>
                    </div>
                    <div>
                        {% block login_heading %}{% endblock %}
                    </div>
                    <div class="panel-body">
                        {% view_block 'form_top' %} {% include 'bootstrap3/errors.html' %} {%if nopersonnel %}
                        <div class="alert alert-danger" role="alert">当前账号禁止登录，没有设置对应真实身份信息，请与管理员联系并完善信息。</div>{%endif%}
                        <div id="div_id_username" class="row{% if form.username.errors %} has-error{% endif %}">
                            <div class="controls clearfix">
                                <div class="input-group">
                                    <span class="input-group-addon"><i class="fa fa-user fa-fw"></i></span>
                                    <input class="form-control" id="id_username" maxlength="254" name="username" type="text"
                                        placeholder="用户名">
                                </div>
                                {% for error in form.username.errors %}
                                <p id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="text-danger help-block">{{ error }}</p>
                                {% endfor %}
                            </div>
                        </div>
                        <div id="div_id_password" class="row{% if form.password.errors %} has-error{% endif %}">
                            <div class="controls clearfix">
                                <div class="input-group">
                                    <span class="input-group-addon"><i class="fa fa-lock fa-fw"></i></span>
                                    <input class="form-control" id="id_password" name="password" type="password" placeholder="密码">
                                </div>
                                {% for error in form.password.errors %}
                                <p id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="text-danger help-block">{{ error }}</p>
                                {% endfor %}
                            </div>
                        </div>
            
                        <input type="hidden" name="this_is_the_login_form" value="1" />
                        <input type="hidden" name="next" value="{{ next }}" />
            
                        <button class="btn btn-primary btn-block btn-lg" type="submit" style="margin-top:20px;">{% trans 'log in' %}</button>
                    </div>
                    <div class="panel-footer">{% view_block 'form_bottom' %}</div>
                    {% endblock %}
                </div>
            </form>
    </div>
</div>
<!-- /container -->
<div class="text-center footer">
    {% if admin_view.admin_version %}
    <h2>版本号：V{{admin_view.admin_version}}</h2>{%endif%} {{admin_view.licensed_to}}
</div>
<script type="text/javascript">
    document.getElementById('id_username').focus()

</script>
{% endblock %}